Ext.create('Ext.data.Store', {
    storeId: 'swe_store1',
    fields: ['regNm', 'yrRd', 'yrW', 'lyW', 'annW', 'lyRt', 'annRt'],
    data: []
});



Ext.define('Admin.view.evaluation.swe.Swe', {
    extend: 'Ext.container.Container',
    xtype: 'swe',
    requires: ['Admin.view.evaluation.swe.SweController'],
    controller: 'sweController',
    layout: {
        type: 'vbox',
        align: 'stretch'
    },
    // userCLs: 'big-100 small-100',
    height: 200,
    autoLoad: true,
    margin: 10,
    items: [{
        height: 46,
        xtype: 'toolbar',
        layout: {
            type: 'hbox',
            align: 'stretch'
        },
        cls: 'shadow',
        margin: '0 0 10 0',
        border: 1,
        style: {
            borderColor: '#ccc',
            borderStyle: 'solid'
        },
        items: [{
            xtype: 'component',
            id: 'sweComboWrapper',
            maxWidth: 220,
            width: '15%'
        }, {
            xtype: 'component',
            width: '65%',
        }, {
            xtype: 'segmentedbutton',
            cls: 'x-box-item my-top-nav',
            docked: 'right',
            width: '20%',
            minWidth: 200,
            maxWidth: '20%',
            items: [{
                id: 'sweBtn1',
                text: '行政分区',
                pressed: true,
                listeners: {
                    "click": 'switchAdminRegion'
                }
            }, {
                id: 'sweBtn2',
                text: '水资源分区',
                listeners: {
                    "click": 'switchWaterRegion'
                }
            }]
        }]
    }, {
        height: 250,
        cls: 'shadow',
        margin: '0 0 10 0',
        listeners: {
            resize: 'buildChart'
        }
    }, {
        flex: 1,
        title: '地表水评价',
        xtype: 'grid',
        reference: 'sweGrid',
        cls: 'shadow',
        style: 'border: 1px solid #ccc',
        autoScroll: true,
        loadMask: true,
        stripeRows: true,
        columnLines: true,
        forceFit: true, //表格自适应
        columns: [{
            text: '分区',
            dataIndex: 'regNm',
            editor: 'textfield',
            align: 'center',
            style: 'background: #EEEEEE'
        }, {
            text: '年径流深（毫米）',
            dataIndex: 'yrRd',
            editor: 'textfield',
            align: 'center',
            style: 'background: #EEEEEE'
        }, {
            text: '年径流量（亿m³）',
            dataIndex: 'yrW',
            editor: 'textfield',
            align: 'center',
            style: 'background: #EEEEEE'
        }, {
            text: '上年径流量（亿m³）',
            dataIndex: 'lyW',
            editor: 'textfield',
            align: 'center',
            style: 'background: #EEEEEE'
        }, {
            text: '多年平均径流量（亿m³）',
            dataIndex: 'annW',
            editor: 'textfield',
            align: 'center',
            style: 'background: #EEEEEE'
        }, {
            text: '与上年比较（±%）',
            dataIndex: 'lyRt',
            editor: 'textfield',
            align: 'center',
            style: 'background: #EEEEEE'
        }, {
            text: '与多年平均比较（±%）',
            dataIndex: 'annRt',
            editor: 'textfield',
            align: 'center',
            style: 'background: #EEEEEE'
        }],
        store: Ext.data.StoreManager.lookup('swe_store1')
    }],
    listeners: {
        afterrender: 'initData'
    }
});